/*
 * OrderLineInfo.java
 *
 * Created on April 15, 2007, 10:14 PM
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package usyd.comp5348;

import java.io.Serializable;

/**
 *
 * @author david
 */
public class OrderLineInfo implements Serializable {
    public static final int UNDEFINED = -1;
    
    private OrderInfo orderInfo;        // which order does this belong to
    private int id;              // order-relative order line id
    private int catalogue_id;    // video foreign key
    private int quantity;        // how many copies being ordered
    
    public OrderLineInfo(int catalogue_id, int quantity) {
        this(UNDEFINED, null, catalogue_id, quantity);
    }
    
    public OrderLineInfo(int id, OrderInfo o, int catalogue_id, int quantity) {
        this.setOrderInfo(o);
        this.setId(id);
        this.setCatalogue_id(catalogue_id);
        this.setQuantity(quantity);
    }

    public OrderInfo getOrder() {
        return orderInfo;
    }

    public void setOrderInfo(OrderInfo o) {
        this.orderInfo = o;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getCatalogue_id() {
        return catalogue_id;
    }

    public void setCatalogue_id(int catalogue_id) {
        this.catalogue_id = catalogue_id;
    }

    public int getQuantity() {
        return quantity;
    }

    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }
}
